翻訳と辞書
Words near each other
・ Event 2
・ Event calculus
・ Event cascade
・ Event Center Arena
・ Event chain diagram
・ Event chain methodology
・ Event chart
・ Event cinema
・ Event Cinemas
・ Event Comics
・ Event condition action
・ Event correlation
・ Event cover
・ Event data
・ Event data recorder
Event dispatching thread
・ Event Driven Executive
・ Event flag
・ Event generator
・ Event horizon
・ Event Horizon (album)
・ Event horizon (disambiguation)
・ Event Horizon (film)
・ Event Horizon (sculpture)
・ Event Horizon Telescope
・ Event Horizons BBS
・ Event loop
・ Event management
・ Event Management (ITIL)
・ Event management software


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Event dispatching thread : ウィキペディア英語版
Event dispatching thread
The event dispatching thread (EDT) is a background thread used in Java to process events from the Abstract Window Toolkit (AWT) graphical user interface event queue. It is an example of the generic concept of event-driven programming, that is popular in many other contexts than Java, for example, web browsers, or web servers.
The events are primarily update events that cause user interface components to redraw themselves, or input events from input devices such as the mouse or keyboard. The AWT uses a single-threaded painting model in which all screen updates must be performed from a single thread. The event dispatching thread is the only valid thread to update the visual state of visible user interface components. Updating visible components from other threads is the source of many common bugs in Java programs that use Swing.〔This problem is not specific to Java Swing. There is the same issue in most Widget toolkits, as for example Windows Forms, where the BackgroundWorker class performs the same purpose as SwingWorker in Java.〕 The event dispatching thread is called the primordial worker in Adobe Flash and the UI thread in SWT, .NET Framework and Android.
== Message Loop for serializing GUI accesses ==

A software application normally consists of multiple threads and a single GUI data structure. This means GUI is a shared data structure and some synchronization is needed to ensure that only one thread accesses it at a time. Though AWT and Swing expose the (thread unsafe) methods to create and access the GUI components and these methods are visible to all application threads, likewise in other GUI frameworks, only a single, Event Dispatching thread has the right to execute these methods.〔(【引用サイトリンク】 title=The Event Dispatch Thread )〕〔(【引用サイトリンク】 title=Debugging Swing - is it really difficult? )
〕〔(【引用サイトリンク】 title=Initial Threads )
Since programmers often miss this requirement, third-party Look and Feels, like (Substance ) go as far as to refuse to instantiate any Swing component when not running within the Event Dispatch Thread,〔http://www.pushing-pixels.org/?p=368〕 to prevent such a coding mistake. Access to the GUI is serialized and other threads may submit some code to be executed in the EDT through a EDT message queue.
That is, likewise in other GUI frameworks, the Event Dispatching Thread spends its life pumping messages: it maintains a message queue of actions to be performed over GUI. These requests are submitted to the queue by system and any application thread. EDT consumes them one after another and responds by updating the GUI components. The messages may be well-known actions or involve callbacks, the references to user-methods that must be executed by means of EDT.
The important requirement imposed on all messages is that they must be executed quickly for the GUI to stay responsive. Otherwise, the message loop is blocked and GUI freezing is experienced.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Event dispatching thread」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.